package com.zt.controller;

import com.zt.common.dtos.ResponseResult;
import com.zt.pojo.ApUser;
import com.zt.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 王佳祥
 * @Date: 2024 09 06 19:52
 */
@RestController
@Api(tags = "登录",description = "登录的controller")
@RequestMapping("/user")
public class LoginController {
    @Autowired
    private ApUserService apUserService;

    /**
     * 登录
     * @param apUser
     * @return
     */
    @PostMapping("/login")
    @ApiOperation("登录")
    public ResponseResult login(@ApiParam("apuser")@RequestBody ApUser apUser){
        ResponseResult login = apUserService.login(apUser);
        return login;
    }
}


